package com.eqdd.yiqidian.ui.gongneng.renshi.finance;

import android.view.View;

import com.eqdd.yiqidian.bean.EnterBean;
import com.eqdd.yiqidian.ui.base.BaseEnterActivity;
import com.eqdd.yiqidian.utils.ToastUtil;

/**
 * @author吕志豪 .
 * @date 18-3-20  上午10:53.
 * Github :https://github.com/lvzhihao100
 * E-Mail：1030753080@qq.com
 * 简书 :http://www.jianshu.com/u/6e525b929aac
 */

public class FinanceManagerActivity extends BaseEnterActivity {

    private int[] decoders = new int[]{10};
    private String[] contents = new String[]{
            "报销设置"
    };

    private Class[] classes = new Class[]{
            ExpenseSettingActivity.class
    };

    @Override
    public void itemClick(int p) {
        if (classes[p] != null) {
            startActivity(classes[p]);
        } else {
            ToastUtil.showShort("该模块暂未开发");
        }
    }

    @Override
    public void initEnterData() {
        isDealCode = true;
        int index = 0;
        initTopTitleBar(View.VISIBLE, "财务管理");
        for (int i = 0; i < contents.length; i++) {
            EnterBean enterBean = new EnterBean();
            if (i == 0) {
                enterBean.setTop(true);
            }
            if (index < decoders.length && i == decoders[index]) {
                index++;
                enterBean.setBottom(true);
                enterBean.setUnderLine(false);
            }
            enterBean.setContent(contents[i]);
            enterBean.setIcon(false);
            enterBean.setEnter(true);
            enterBeans.add(enterBean);
        }

    }
}
